<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>充值成功</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            font-size: 12px;
        }
        h1{
            text-align: center;
            padding: 3rem 0 2rem 0;
            font-size: 2rem;
        }
        div{
            width: 80%;
            margin: 0 auto;
            font-size: 1rem;
        }
        div>p{
            margin: 1rem 0;
            line-height: 2rem;
        }
        div>p>span{
            
        }
        strong{
            
        }
    </style>
</head>
<body>
    <h1>九护关爱充值成功</h1>
    <div>
        <p>
        <span>九护号:</span> 
        <strong id="jiuhuid"></strong>
        </p>
        <p>
            <span>到期时间:</span>
            <strong id="timestr"></strong>
        </p>
    </div>
    <script>
        function UrlSearch() 
        {
        var name,value; 
        var str=location.href; //取得整个地址栏
        var num=str.indexOf("?") 
        str=str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]

        var arr=str.split("&"); //各个参数放到数组里
        for(var i=0;i < arr.length;i++){ 
            num=arr[i].indexOf("="); 
            if(num>0){ 
            name=arr[i].substring(0,num);
            value=arr[i].substr(num+1);
            this[name]=value;
            } 
            } 
        } 
        var Request=new UrlSearch(); //实例化
         document.getElementById("jiuhuid").innerHTML = Request.slaveid;  
         document.getElementById("timestr").innerHTML =decodeURI(Request.enddaystr);    
    </script>
</body>
</html>